import sleep from '@utils/sleep';

const heros: heros = [
    ['weiyan', 'shu', 1, 4, ['kuanggu', 'yiji']],
    ['xiaoqiao', 'wu', 0, 3, ['tianxiang']],
    ['guojia', 'wei', 1, 3, ['yiji']],
    ['caiwenji', 'qun', 1, 10, ['beige']],
    ['simayi', 'wei', 1, 3, ['fankui']],
    ['sunce', 'wu', 1, 4, ['hunzi', 'biyue']],
];
const herosSkills: _skills = {
    kuanggu: {
        trigger: { player: ['damageWhen'] },
        async content(e) {
            await sleep(1000);
        },
    },
    yiji: {
        trigger: {
            player: ['woundedAfter'],
        },
        async content(e) {
            await sleep(3000);
        },
    },
    fankui: {
        trigger: {
            player: ['woundedAfter'],
        },
        async content(e) {
            await sleep(1000);
        },
    },
    beige: {
        trigger: {
            global: ['woundedAfter'],
        },
        async content(e) {
            await sleep(1000);
        },
    },
    hunzi: {
        trigger: { player: ['phasePrepare'] },
        async content(e) {
            this.addSkills('yinghun', 'yingzi');
        },
    },
    yinghun: {
        trigger: { player: ['phasePrepare'] },
        async content(e) {},
    },
    yingzi: {
        trigger: {
            player: ['phaseDrawBegin'],
        },
        async content(e) {
            e.num!++;
        },
    },
    tianxiang: {
        trigger: {
            player: ['woundedWhen'],
        },
        async content(e) {
            e.finish();
            // await sleep(2000);
        },
    },
    biyue: {
        trigger: {
            player: ['phaseEnd'],
        },
        async content(e) {
            // await sleep(2000);
        },
    },
};
const tr: tr = {
    weiyan: '魏延',
    kuanggu: '狂骨',
    simayi: '司马懿',
    fankui: '反馈',
    guicai: '鬼才',
    guojia: '郭嘉',
    tiandu: '天妒',
    yiji: '遗计',
    caiwenji: '蔡文姬',
    beige: '悲歌',
    duanchang: '断肠',
    sunce: '孙策',
    hunzi: '魂资',
    yinghun: '英魂',
    zhouyu: '周瑜',
    yingzi: '英姿',
    xiaoqiao: '小乔',
    tianxiang: '天香',
    diaochan: '貂蝉',
    biyue: '闭月',
};
const allSkillsName = Object.keys(herosSkills);

export { heros, herosSkills, tr, allSkillsName };
